home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 22
/
freelog 22.iso
/
Prog
/
Djgpp
/
GPC2952B.ZIP
/
doc
/
gpc
/
docdemos
/
assigneddemo.pas
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Pascal/Delphi Source File
|
2001-02-09
|
317 b
|
20 lines
program AssignedDemo;
type
PInt = ^Integer;
procedure TellIfOdd (p: PInt);
begin
if Assigned (p) and then Odd (p^) then
WriteLn ('The pointer p points to an odd value.')
end;
var
foo: Integer;
begin
TellIfOdd (nil);
foo := 1;
TellIfOdd (@foo);
foo := 2;
TellIfOdd (@foo)
end.